package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.LhqTeachingMaterialGradeMapper;
import com.ruoyi.domain.LhqTeachingMaterialGrade;
import com.ruoyi.service.ILhqTeachingMaterialGradeService;
import com.ruoyi.common.core.text.Convert;

/**
 * 教材等级Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-08
 */
@Service
public class LhqTeachingMaterialGradeServiceImpl implements ILhqTeachingMaterialGradeService 
{
    @Autowired
    private LhqTeachingMaterialGradeMapper lhqTeachingMaterialGradeMapper;

    /**
     * 查询教材等级
     * 
     * @param id 教材等级ID
     * @return 教材等级
     */
    @Override
    public LhqTeachingMaterialGrade selectLhqTeachingMaterialGradeById(Long id)
    {
        return lhqTeachingMaterialGradeMapper.selectLhqTeachingMaterialGradeById(id);
    }

    /**
     * 查询教材等级列表
     * 
     * @param lhqTeachingMaterialGrade 教材等级
     * @return 教材等级
     */
    @Override
    public List<LhqTeachingMaterialGrade> selectLhqTeachingMaterialGradeList(LhqTeachingMaterialGrade lhqTeachingMaterialGrade)
    {
        return lhqTeachingMaterialGradeMapper.selectLhqTeachingMaterialGradeList(lhqTeachingMaterialGrade);
    }

    /**
     * 新增教材等级
     * 
     * @param lhqTeachingMaterialGrade 教材等级
     * @return 结果
     */
    @Override
    public int insertLhqTeachingMaterialGrade(LhqTeachingMaterialGrade lhqTeachingMaterialGrade)
    {
        return lhqTeachingMaterialGradeMapper.insertLhqTeachingMaterialGrade(lhqTeachingMaterialGrade);
    }

    /**
     * 修改教材等级
     * 
     * @param lhqTeachingMaterialGrade 教材等级
     * @return 结果
     */
    @Override
    public int updateLhqTeachingMaterialGrade(LhqTeachingMaterialGrade lhqTeachingMaterialGrade)
    {
        return lhqTeachingMaterialGradeMapper.updateLhqTeachingMaterialGrade(lhqTeachingMaterialGrade);
    }

    /**
     * 删除教材等级对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteLhqTeachingMaterialGradeByIds(String ids)
    {
        return lhqTeachingMaterialGradeMapper.deleteLhqTeachingMaterialGradeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除教材等级信息
     * 
     * @param id 教材等级ID
     * @return 结果
     */
    @Override
    public int deleteLhqTeachingMaterialGradeById(Long id)
    {
        return lhqTeachingMaterialGradeMapper.deleteLhqTeachingMaterialGradeById(id);
    }

    @Override
    public LhqTeachingMaterialGrade selctByName(String grade) {
        return lhqTeachingMaterialGradeMapper.selctByName(grade);
    }
}
